package org.example.coursemangementserver.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.example.coursemangementserver.pojo.entity.CourseReview;
import org.example.coursemangementserver.pojo.vo.course.CommentCourseStatistics.CommentCourseStatisticVO;
import org.example.coursemangementserver.pojo.vo.course.StudentCommentList.StudentCommentVO;
import org.example.coursemangementserver.pojo.vo.course.TeacherCourseRatingStatistics.TeacherCourseRatingStatisticVO;

import java.util.List;

public interface CourseReviewMapper extends BaseMapper<CourseReview> {
    /**
     * 获取该老师的所授课程的被评价的信息总数
     * @param userId
     * @param name
     * @param studentName
     * @return
     */
    Integer getStudentCommentTotal(@Param("teacherId") Long userId, @Param("name") String name, @Param("studentName") String studentName);

    Integer getEnrollmentCommentTotal(@Param("enrollmentId") Long enrollmentId);
    /**
     * 获取该老师的所授课程的被评价的信息
     * @param start
     * @param pageSize
     * @param userId
     * @param name
     * @param studentName
     * @return
     */
    List<StudentCommentVO> getStudentCommentList(@Param("start") Integer start, @Param("pageSize") Integer pageSize, @Param("teacherId") Long userId, @Param("name") String name, @Param("studentName") String studentName);

    List<StudentCommentVO> getEnrollmentCommentList(@Param("enrollmentId") Long enrollmentId);

    List<CommentCourseStatisticVO> getCommentCourseStatistics();

    /**
     * 教务人员获取教师课程评价统计数据
     * @return
     */
    List<TeacherCourseRatingStatisticVO> getTeacherCourseStatistics();
}
